import request from '@/config/axios'

export type PartyAVO = {
  id: string,
  companyName: string,
  phone: string,
  address: string,
  remark: string
}

export const getPartyAPage = (params: PageParam): Promise<{
  total: number,
  list: PartyAVO[]
}> => request.get({
  url: '/business/partyA/page',
  params
})
export const getPartyA = (id: number): Promise<PartyAVO> => request.get({
  url: `/business/partyA/${id}`
})

export const delPartyAList = (ids: number[]): Promise<PartyAVO> => request.get({
  url: `/business/partyA/delete`,
  params: {ids: ids.join(',')}
})
export const createPartyA = (data: PartyAVO) => request.post({
  url: `/business/partyA/create`,
  data
})
export const updatePartyA = (data: ProjectVO) => request.post({
  url: `/business/partyA/update`,
  data
})

